const express = require("express")
const router = express.Router()
const Mock = require("mockjs")

router.get("/list", (req, res, next) => {
  res.success(
    Mock.mock({
      "items|30": [
        {
          id: "@id",
          title: "@sentence(5, 20)",
          "status|1": ["published", "draft", "deleted"],
          author: "@cname(3)",
          display_time: "@datetime",
          pageviews: "@integer(300, 5000)"
        }
      ]
    })
  )
})

module.exports = router
